package com.hooper.common.util;

import java.util.Map;
import java.util.Random;

/**
 * @author Tim Hooper
 * @version 1.0
 * @time 2022/10/03/23:42
 */
public class SmsCodeGenerator {
    public static String generate(int digit){
        StringBuilder sb = new StringBuilder(digit);
        for (int i = 0; i < digit; i++) {
            int c = (int) (Math.random() * 10);
            sb.append(c);
        }
        return sb.toString();
    }
}
